<?php
namespace console\controllers;

use yii\console\Controller;

class TestController extends Controller
{
    public function actionTest()
    {
        file_put_contents('/usr/local/src/log1.txt','hey_test',FILE_APPEND);
    }
}